package com.hoshiicloud.user.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.goods.entity.goods.GoodsGallery;
import com.hoshiicloud.goods.entity.sku.BaseSku;
import com.hoshiicloud.goods.entity.sku.ExtSku;
import com.hoshiicloud.goods.entity.sku.ProductManage;
import com.hoshiicloud.goods.entity.spu.BaseSpu;
import com.hoshiicloud.goods.entity.spu.ExtSpu;
import com.hoshiicloud.goods.entity.spu.ExtSpuTags;
import com.hoshiicloud.goods.entity.spu.SpuSalesCategory;
import com.hoshiicloud.goods.param.ListSkuSpuParam;
import com.hoshiicloud.goods.param.goods.GoodsGalleryQueryParam;
import com.hoshiicloud.goods.param.sku.ExtSkuAddParam;
import com.hoshiicloud.goods.param.sku.ExtSkuUpdateParam;
import com.hoshiicloud.goods.param.sku.ProductManageAddParam;
import com.hoshiicloud.goods.param.sku.ProductManageUpdateParam;
import com.hoshiicloud.goods.param.spu.ExtSpuAddParam;
import com.hoshiicloud.goods.param.spu.SpuSalesCategoryAddParam;
import com.hoshiicloud.goods.param.spu.SpuSalesCategoryQueryParam;
import com.hoshiicloud.user.feign.hystrix.HystrixIdGeneratorFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(name = "hoshiicloud-goods", fallback = HystrixIdGeneratorFeignFallback.class)
@Repository
public interface GoodsService {
    @GetMapping(value = "/goods/goods-category/{id}")
    Response getGoodsCategoryById(@PathVariable("id") Long id);


    @GetMapping(value = "/goods/product-manage/getStoreSkuNum")
    Response getStoreSkuNum(@RequestParam("storeIds") List<Long> storeIds);


    @PostMapping(value = "/goods/ext-sku/save")
    Response<Boolean> saveExtSku(@RequestBody ExtSkuAddParam param);


    @PostMapping(value = "/goods/ext-spu/save")
    Response<Boolean> saveExtSpu(@RequestBody ExtSpuAddParam param);








    @PostMapping("/goods/spu-sales-category/save")
    Response<Boolean> spuSalesCategoryAdd(@RequestBody SpuSalesCategoryAddParam param);

    @GetMapping("/goods/base-spu/{id}")
    Response<BaseSpu> getBaseSpuById(@PathVariable("id") Long id);




    @PostMapping("/gallery/goodsGallery/saveBatch")
    Response<Boolean> saveGoodsGalleryBatch(@RequestBody List<GoodsGallery> galleryList);
}
